/* structs.h */

#ifndef STRUCTS_H
#define STRUCTS_H

#include "buffer.h"

enum {MODE_COMMAND, MODE_INSERT, MODE_EX};

/* key handler type */
typedef int( * INPUT_HANDLER)(int);


typedef struct cursor_pos{
	buf_t * buf;
	int offset;
	int line;
	int col;
}cursor_pos_t;


/* a struct used to store the display information,
 * such as the file buffer, cursor position, etc.
 */

typedef struct screen{
	buf_t * buf;
	
	buf_t * start_buf;
	int start_line;
	int line_count;

	int edit_mode;
	
	cursor_pos_t cursor_pos;
	
}screen_t;


typedef struct edit_mode{
	INPUT_HANDLER key_recieved;
} edit_mode_t;

typedef struct vie{
	int current_mode;
} vie_t;

#endif //STRUCTS_H
